package com.ity.teamanagement.code;

/**
 * @author coderFu
 * @create 2021/6/2
 */
public enum ImgCode implements Code {

    IMG_UPDATE_ERROR(false,800,"图片上传失败"),
    IMG_NOT_EXIST(false,801,"图片不存在"),
    IMG_UPDATE_SUCCESS(true,802,"图片上传成功"),
    IMG_DELETE_ERROR(false,803,"图片删除失败"),
    IMG_DELETE_SUCCESS(true,804,"图片删除成功"),
    IMG_COMPRESS_ERROR(false,805,"图片压缩失败"),
    IMG_SIZE_BEYOND(false,806,"图片大小过大");




    ImgCode(boolean success, Integer code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }

    private boolean success;

    private Integer code;

    private String message;


    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
